from ConfigParser import ConfigParser
class DefaultConfigParser ( ConfigParser ):
	def __init__(self, verbose=0):
		ConfigParser.__init__(self)
		self.verbose=verbose
		if verbose:
			print "creating a new Default configuration class"
	
	def get(self, section, key, default=''):
		try:
			if self.verbose:
				print self.__class__,": try to fetch :",section,".",key
			result=eval (ConfigParser.get(self, section, key))
			if self.verbose:
				print self.__class__,": ",section,".",key,"=", result
		except Exception:
			result=default
			if self.verbose:
				print self.__class__,": ",section,".",key,"=", default,"(Default Value)"
		return result
